package com.yanqu.backendweb.bean.enums;

import com.yanqu.backendweb.service.*;
import com.yanqu.backendweb.service.impl.*;
import com.yanqu.road.entity.enums.ConvertibleEnum;

/**
 * @author duli
 * @version 1.0
 * @date 2020/11/4 17:31
 * @Description 日志小类
 */
public enum LogType implements ConvertibleEnum<Integer> {

    LOGIN(0,"登录日志",LogCategory.PLAYER, TLLoginServiceImpl.class),
    PRE_RECHARGE(1,"预下单日志",LogCategory.PLAYER, TLPreRechargeServiceImpl.class),
    CARD_DAILY_REWARD(2,"特权卡每日奖励日志",LogCategory.PLAYER, TLCardDailyRewardServiceImpl.class),
    SHOP_BUY(3,"商店购买日志",LogCategory.PLAYER, TLPreRechargeServiceImpl.class),
    BAG_PROPS(4,"背包道具变更日志",LogCategory.PLAYER, TLGoodsServiceImpl.class),
    INGOTS(5,"元宝变更",LogCategory.PLAYER, TLIngotsServiceImpl.class),
    RESOURCE_RECEIVE(6,"资源获得日志",LogCategory.PLAYER, TLLoginServiceImpl.class),
    DECORATION(7,"饰品获得日志",LogCategory.PLAYER, TLPreRechargeServiceImpl.class),
    BAG_PROMOTION_PROPS(8,"背包提升类道具",LogCategory.PLAYER, TLLoginServiceImpl.class),
    GUIDE(8,"引导日志",LogCategory.PLAYER, TLGuideServiceImpl.class),
    VIP_EXPERIENCE(10,"VIP经验日志",LogCategory.PLAYER, TLLoginServiceImpl.class),
    TRAVEL(11,"游历日志",LogCategory.PLAYER, TLTravelServiceImpl.class),

    MAIL(101,"用户邮件记录",LogCategory.MAIL, TLMailServiceImpl.class),


    BUILDING_UPGRADE(201,"店铺升级日志",LogCategory.BUILDING, TLBuildingUpgradeServiceImpl.class),
    ADD_STAFF(202,"员工招募日志",LogCategory.BUILDING, TLLoginServiceImpl.class),
    HOUSE_UPGRADE(203,"钱庄升级日志",LogCategory.BUILDING, TLPreRechargeServiceImpl.class),

    PATRONS_BREAK(301,"门客突破日志",LogCategory.PATRONS, TLPatronsBreakServiceimpl.class),
    PATRONS_STAGE(302,"门客精进日志",LogCategory.PATRONS, TLPreRechargeServiceImpl.class),

    ADD_VEHICLE(401,"珍兽获得日志",LogCategory.VEHICLE, TLGetVehicleServiceImpl.class),
    VEHICLE_RECYCLE(402,"珍兽放归日志",LogCategory.VEHICLE, TLDeleteVehicleServiceImpl.class),
    VEHICLE_STUDY(403,"珍兽觉醒日志",LogCategory.VEHICLE, TLVehicleStudyServiceImpl.class),


    PUBLISH_TRADE_WAR_WANTED(501,"发布通缉日志",LogCategory.TRADE_WAR, TLPublishWantedServiceImpl.class),
    TRADE_WAR_BUILDING_UPGRADE(502,"商战建筑升级日志",LogCategory.TRADE_WAR, TLTradeWarBuildingRewardServiceImpl.class),
    TRADE_WAR_BUILDING_REWARD(503,"商战建筑收益日志",LogCategory.TRADE_WAR, TLTradeWarBuildingRewardServiceImpl.class),
    TRADE_WAR_BATTLE(504,"商战出战日志",LogCategory.TRADE_WAR, TLLoginServiceImpl.class),

    BANQUET_SERVER_OPEN(601,"发起宴会日志",LogCategory.RESTAURANT, TLPreRechargeServiceImpl.class),
    BANQUET_EXPIRED(602,"过期宴会",LogCategory.RESTAURANT, TLLoginServiceImpl.class),

    TASK_REWARD(701,"任务奖励日志",LogCategory.REWARD, TLTaskRewardServiceImpl.class),
    TASK_SEVEN_DAY_ACTIVE_REWARD(702,"七日任务活跃度奖励日志",LogCategory.REWARD, TLTaskActiveRewardServiceImpl.class),
    TURNTABLE_REWARD(703,"转盘满幸运值领取日志",LogCategory.REWARD, TLPreRechargeServiceImpl.class),

    FATE_SKILL_UPGRADE(801,"美女缘分升级日志",LogCategory.BEAUTY, TLLoginServiceImpl.class),
    INTIMACY_CHANGE(802,"亲密度变更",LogCategory.BEAUTY, TLBeautyIntimacyServiceImpl.class),
    GLAMOUR_CHANGE(803,"美女魅力值变更日志",LogCategory.BEAUTY, TLBeautyGlamourServiceImpl.class),
    BEAUTY_GET(804,"美女获得日志",LogCategory.BEAUTY, TLPreRechargeServiceImpl.class),
    SKILL_REFINE(805,"美女技能洗练日志",LogCategory.BEAUTY, TLBeautySkillRefineServiceImpl.class),
    SKILL(806,"美女技能日志",LogCategory.BEAUTY, TLPreRechargeServiceImpl.class),

    CHILD_ADULT_REWARD(901,"子嗣成年奖励日志",LogCategory.MARRIAGE_CHILD, TLChildAdultRewardServiceImpl.class),
    MARRIAGE_REWARD(902,"联姻成功奖励日志",LogCategory.MARRIAGE_CHILD, TLMarriageRewardServiceImpl.class),
    MARRIAGE(903,"结亲家和解除亲家日志",LogCategory.MARRIAGE_CHILD, TLLoginServiceImpl.class),

    ESTATE_WAR_DAILY_REWARD(1001,"乔迁风云每日奖励日志",LogCategory.RELOCATION, TLPreRechargeServiceImpl.class),
    ESTATE_FLOOR_RISE_REWARD(1002,"登录日志",LogCategory.RELOCATION, TLLoginServiceImpl.class),
    ESTATE_WAR_WORSHIP(1003,"乔迁风云膜拜日志",LogCategory.RELOCATION, TLPreRechargeServiceImpl.class),

    UNION_DELETE(1101,"解散商会日志",LogCategory.UNION, TLLoginServiceImpl.class),
    CHANGE_MASTER(1102,"转让会长日志",LogCategory.UNION, TLPreRechargeServiceImpl.class),
    EXP(1103,"商会经验变更日志",LogCategory.UNION, TLLoginServiceImpl.class),
    WEALTH(1104,"商会财富变更日志",LogCategory.UNION, TLPreRechargeServiceImpl.class),
    CONTRIBUTION(1105,"商会成员贡献日志",LogCategory.UNION, TLLoginServiceImpl.class),

    KILL(1201,"狩猎击杀日志",LogCategory.HUNT, TLPreRechargeServiceImpl.class),
    BATTLE(1202,"狩猎攻击日志",LogCategory.HUNT, TLLoginServiceImpl.class),
    OPEN_BOX(1203,"狩猎宝箱奖励日志",LogCategory.HUNT, TLPreRechargeServiceImpl.class),
    SACRIFICE_KILL(1204,"丘虚祭天击杀日志",LogCategory.HUNT, TLLoginServiceImpl.class),
    SACRIFICE_DAMAGE_RANK_REWARD(1205,"丘墟祭天伤害排行奖励日志",LogCategory.HUNT, TLLoginServiceImpl.class),
    SACRIFICE_ATTACK(1206,"丘墟祭天伤害日志",LogCategory.HUNT, TLPreRechargeServiceImpl.class),

    Score(1301,"活动积分获得日志",LogCategory.COMMON_ACTIVITY, TLPreRechargeServiceImpl.class),
    USE_GOODS(1302,"活动道具使用日志",LogCategory.COMMON_ACTIVITY, TLLoginServiceImpl.class),
    REWARD(1303,"活动奖励日志",LogCategory.COMMON_ACTIVITY, TLPreRechargeServiceImpl.class),
    RANK_REWARD(1304,"活动排名奖励日志",LogCategory.COMMON_ACTIVITY, TLPreRechargeServiceImpl.class),
    GOODS_AUTO_CONSUME(1305,"活动过期道具自动消耗日志",LogCategory.COMMON_ACTIVITY, TLLoginServiceImpl.class),

    MAMMON_WORSHIP(1401,"财神庙参拜日志",LogCategory.WORSHIP, TLPreRechargeServiceImpl.class),
    MAMMON_CONGRATULATE(1402,"财神簿恭贺日志",LogCategory.WORSHIP, TLPreRechargeServiceImpl.class),
    RANK_WORSHIP(1403,"排行榜膜拜日志",LogCategory.WORSHIP, TLPreRechargeServiceImpl.class),

    RANK(1501,"排行榜排名",LogCategory.RISERANK, TLLoginServiceImpl.class),

    DO(1601,"行善日志",LogCategory.CHARITABLE, TLPreRechargeServiceImpl.class),
    UPGRADE(1602,"行善地点升级日志",LogCategory.CHARITABLE, TLLoginServiceImpl.class),

    ROB_PIT(1701,"抢占据点日志",LogCategory.SALTWORKS_TYCOON, TLPreRechargeServiceImpl.class),
    POINTS_INCOME(1702,"盐场积分收益日志",LogCategory.SALTWORKS_TYCOON, TLLoginServiceImpl.class),

    ;
    private int intValue;
    private String name;
    private LogCategory category;
    private Class<? extends AbsLogService> service;

    public Class<? extends AbsLogService> getService() {
        return service;
    }

    LogType(int value, String name,LogCategory category,Class<? extends AbsLogService> service) {
        intValue = value;
        this.name=name;
        this.category=category;
        this.service=service;
    }
    @Override
    public Integer getIntValue() {
        return intValue;
    }

    @Override
    public String getName() {
        return name;
    }

    public static LogType forValue(int value) {
        for (LogType type : LogType.values()) {
            if (type.intValue == value) {
                return type;
            }
        }
        return null;
    }
}
